//
//  CXPlayMvViewController.m
//  LeeMusic
//
//  Created by ChuXiang on 15/12/9.
//  Copyright © 2015年 ChuXiang. All rights reserved.
//

#import "LoveMusicPlayer.h"
#import <AVFoundation/AVFoundation.h>
@implementation LoveMusicPlayer

+ (LoveMusicPlayer *)sharePlayer{
    static LoveMusicPlayer* Player = nil;
    if (Player==nil) {
        Player =[[LoveMusicPlayer alloc] init];
    }
    return Player;
}

- (void)playWithURL:(NSString *)url{
    AVPlayerItem * item = [[AVPlayerItem alloc] initWithURL:[NSURL URLWithString:url]];
    [self replaceCurrentItemWithPlayerItem: item];
    
    [self play];
}
@end
